#ifndef CICORE_POINT2D_H
#define CICORE_POINT2D_H

#include <cmath>

namespace CICore {
    class Point2D {    

    public:        
        Point2D (const int x=0, const int y=0);       //Constructor        
        virtual ~Point2D ();                          //Destructor

        int x, y;      //Point2D's coordinates            
    };    

    //Basic point's unary operations
    Point2D& operator ++ (Point2D& p, int);             //Postfix increment
    Point2D& operator ++ (Point2D& p);                  //Prefix increment

    Point2D& operator -- (Point2D& p, int);             //Postfix decrement
    Point2D& operator -- (Point2D& p);                  //Prefix increment

    //Basic point's binary operations
    Point2D operator + (const Point2D& a, const Point2D& b);      //Sum between two points
    Point2D& operator += (Point2D& a, const Point2D& b);          //Assignment by addition between two points

    Point2D operator - (const Point2D& a, const Point2D& b);      //Difference between two points
    Point2D& operator -= (Point2D& a, const Point2D& b);          //Assignment by substraction between two points

    Point2D operator * (const Point2D& a, const Point2D& b);      //Product between two points
    Point2D& operator *= (Point2D& a, const Point2D& b);          //Assignment by multiplication between two points

    Point2D operator / (const Point2D& a, const Point2D& b);      //Quotient between two points
    Point2D& operator /= (Point2D& a, const Point2D& b);          //Assignment by division between two points

    Point2D operator + (const Point2D& a, const int b);       //Sum between a point and a int value
    Point2D& operator += (Point2D& a, const int b);           //Assignment by addition between a point and a int value

    Point2D operator - (const Point2D& a, const int b);       //Difference between a point and a int value
    Point2D& operator -= (Point2D& a, const int b);           //Assignment by substraction between a point and a int value

    Point2D operator * (const Point2D& a, const int b);       //Product between a point and a int value
    Point2D& operator *= (Point2D& a, const int b);           //Assignment by multiplication between a point and a int value

    Point2D operator / (const Point2D& a, const int b);       //Quotient between a point and a int value
    Point2D& operator /= (Point2D& a, const int b);           //Assignment by division between a point and a int value

}
#endif /* CICORE_POINT2D_H */
